import {Navigate} from 'react-router-dom'

export default ({children}) => {
    if (localStorage.getItem('token') === 'false') return <Navigate to={'/login'} replace/>
    else return (children)

}